package com.game.autoTool.project.web.controller;

import com.game.autoTool.project.web.domain.entity.GameFunctionOperateFlow;
import com.game.autoTool.project.web.domain.resp.Result;
import com.game.autoTool.project.web.service.GameFunctionOperateFlowService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 只是用来运行AccountUpgraderTool,后期可能改为录制操作,然后循环执行
 * 例如起号助手工具类main方法执行时请求接口的,先启动AutoToolApplication,在启动AccountUpgraderTool
 */
@RestController
@RequestMapping("/flow")
public class FlowController {


    @Autowired
    private GameFunctionOperateFlowService gameFunctionOperateFlowService;

    /**
     * 记录
     *
     * @return
     */
    @PostMapping(value = "/record")
    public Result<Integer> record(@RequestBody GameFunctionOperateFlow functionOperateFlow) {
        return Result.succeed(gameFunctionOperateFlowService.record(functionOperateFlow));
    }

}
